from django.db import models


# Create your models here.
class Animalinfo(models.Model):
    """实验动物信息"""
    model = models.ForeignKey('self', related_name='mods', null=True, blank=True, on_delete=models.CASCADE,
                              verbose_name='动物模型id')
    animal_name = models.CharField(max_length=10, verbose_name='动物品种名称')
    animal_detail = models.CharField(max_length=10, verbose_name='动物品系名称', null=True, blank=True)
    animal_env = models.CharField(max_length=20, verbose_name='动物饲养环境', null=True, blank=True)
    animal_facility = models.CharField(max_length=20, verbose_name='动物饲养设施', null=True, blank=True)
    animal_bio = models.CharField(max_length=100, verbose_name='动物生物学信息', null=True, blank=True)
    animal_supplier = models.CharField(max_length=30, verbose_name='动物供应商')
    animal_contact = models.CharField(max_length=11,verbose_name="联系方式",null=True,blank=True)
    animal_soucedep = models.CharField(max_length=30, verbose_name='动物来源单位', null=True, blank=True)
    animal_usedep = models.CharField(max_length=30, verbose_name='动物使用单位')
    animal_num = models.IntegerField(verbose_name="现数量",null=True,blank=True)

class Meta:
    db_table = 'animal_relinfo'
    verbose_name = '实验动物相关信息'
    verbose_name_plural = verbose_name


def __str__(self):
    return self.animal_name
